﻿<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!--
//*****************************************************************************
// Distributed under the GNU General Public Licence
//*****************************************************************************
-->
<xsl:template match="view">
    <xsl:choose>
        <xsl:when test="name = 'help'">
            <ul> 	           <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages</xsl:attribute>Pages</a></li> 	           <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq</xsl:attribute>FAQ</a></li>           </ul>
        </xsl:when>

        <xsl:when test="name = 'pages'">
            <ul> 	            <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages/add-edit-booking</xsl:attribute>Add/Edit Booking</a></li> 	            <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages/allocations</xsl:attribute>Allocations</a></li> 	            <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages/bookings</xsl:attribute>Bookings</a></li> 	            <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages/daily-summary</xsl:attribute>Daily Summary</a></li> 	            <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages/housekeeping</xsl:attribute>Housekeeping</a></li> 	            <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/pages/resources</xsl:attribute>Resources</a></li>            </ul>
        </xsl:when>

        <xsl:when test="name = 'add-edit-booking'">
            <h1>Introduction</h1>            Add a new booking/allocation or edit an existing booking.                        <h1>Details</h1>            <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/add_booking_sample.png" alt="" />             Click "New Booking" under the menu to enter a new booking. To edit an existing booking, click on the link/icon of the booking/allocation to edit in the Allocation or Booking view.             First Name, Last Name: self-explanatory. this is the name the booking will be under. Only a first name is required.             Booked by: How the booking was originally made. e.g. HostelWorld, HostelBookers, Telephone, Walk-in, etc..             Audit Log/Comments: User comments can be entered here. e.g. Amount payable on arrival can be manually entered here. Future functionality may include a separate field to sum payment amounts for each booking/day. This also holds a log of all changes made to the booking since it was created including changes to the allocations, change in status (from reserved to paid for example) along with the date/time and user who made the change.            <h2>Allocations</h2>            This is where we define all the guest(s) for this booking and their room/bed allocations. Select the dates for the booking using the calendar widget.             Room/Bed: Select an individual bed (for 1 guest), or select a room/group to auto-allocate the number of guest among the available beds.             Requested Room Type: Select from Mixed, Male or Female rooms. Rooms that have defined room types will be assigned first followed by rooms without specific gender assignments (see Resources).             Assign To: Only assign to rooms with the selected properties ticked (see Resource Properties).             Clicking "Add" will allocate the guest(s) to the selected group/room(s) displayed in a table placed below under the status of "Reserved". Clicking on the date cell in the table will toggle the state from Reserved to Paid/Checked-in, Free, etc..             "Save" will permanently commit these changes.
        </xsl:when>

        <xsl:when test="name = 'allocations'">
            <h1>Introduction</h1>             This view allows a user to see at a glance which rooms are full/empty on a particular day or set of days.             <h1>Details</h1>             <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/allocations_sample.png" alt="" />              Enter the from and to dates and click apply to perform the search. Dates are always inclusive. A pull-tab will show/hide the legend showing the colours corresponding to current state of the allocation for that date (e.g. paid, reserved, etc..)              Allocations will be displayed ordered by group and resource (order as shown on the Resources page).              Clicking on any of the allocations will bring up the Edit Booking form for that particular booking.              Print: renders a printer-friendly version of this page (not implemented).              Export: exports the current contents of the page to CSV/Excel (not implemented).
        </xsl:when>

        <xsl:when test="name = 'bookings'">
            <h1>Introduction</h1>             The search page allows a user to fetch an existing booking.             <h1>Details</h1>             <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/bookings_sample.png" alt="" />              Booking Status: Only show those bookings with <em>any</em> allocation for a particular booking matching this status (e.g. reserved, paid, cancelled). Default is ALL.              Date from/to: provide the from/to dates inclusive to search by. The dates here is used in conjunction with the "Match Dates By" field following.              Match Dates By:             <ul> 	            <li>Check-In Date (default): Show those bookings where the "check-in" date for a booking (the first date of a date-range for an allocation) falls within the to/from dates provided.</li> 	            <li>Check-Out Date: Show those bookings where the "check-out" date for a booking (the last date of a date-range for an allocation) falls within the to/from dates provided.</li> 	            <li>Reservation Date (Any): Show those bookings where <em>any</em> allocation date (regardless of status) falls within the to/from dates provided.</li> 	            <li>Date Added: Show those bookings where the date the booking was created in the system falls within the to/from dates provided.</li>             </ul>             Search by Booking ID: enter the unique booking id to search for an exact booking              Search by Name: Show those bookings where either the first/last name for the booking or the guest name for an allocation matches. Search is <em>NOT</em> case sensitive. (<tt>*</tt>) can be used as a wildcard for any number of characters.              Example 1: <tt>sara*</tt> will match "sara" or "sarah" or "sarandon".              Example 2: <tt>rebe*a</tt> will match "Rebecca" or "Rebeka".              Print: displays a printer-friendly table of the current results along with a print dialog (not yet implemented).              Export: exports the current results to a CSV/Excel file (not yet implemented).             <h2>Search Results</h2>             ID: ID of the booking as well as the creation date and user who created the booking.              Tags: Shows the properties for the booking. This includes: the room(s) allocated, the active statuses and the manner in which the booking was made (e.g. telephone, HostelWorld, etc...)              Booking Details: Names/Guests and user-created comments.              Booking Dates: Dates across all allocations.              Actions: Clicking on the pencil icon will redirect to the Edit Booking screen. Clicking on the Checkout icon will change all allocations ending today to "checked-out" (not yet implemented).
        </xsl:when>

        <xsl:when test="name = 'daily-summary'">
            <h1>Introduction</h1>             Shows at a high level the number of checkins/checkouts as well as the number of free beds available for a given day.             <h1>Details</h1>             <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/daily_summary_sample.png" alt="" />              After selecting a date (only one day at a time), the tables showing the checkins/checkouts by room automatically update.              Following that is a table showing the number of free beds available again broken down by group/room number. (not yet implemented)              This is a read-only page. No changes can be made on this screen.
        </xsl:when>

        <xsl:when test="name = 'resources'">
            <h1>Introduction</h1>             This page allows admins to add/remove groups, rooms and beds. Items are arranged in a tree structure with groups at the top level, followed by (sub)groups and rooms underneath. Beds can only be defined under a room.             <h1>Details</h1>             <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/resources_sample.png" alt="" />              Admin users will see a Resources tab on the left sidebar. Clicking on it will bring up this screen. Resources can be added to the right. Rooms should be grouped into distinct categories that will be used when allocating a booking. For example, a group name could be called "HostelWorld 10-bed dorms". Then this group can be selected when creating a new booking to automatically assign a guest to an available bed within this group.              Define high-level groups first, followed by rooms and finally beds. When defining room type (for dorm rooms), you can select "Male only", "Female only", "Mixed", or "None". A room defined as "Male only" will only allow booking for guests who specifically request a "Male only" room. Likewise for "Female only" and "Mixed". A dorm room with a room type of "None" will take on the attribute of a Male, Female or Mixed room depending on which guest(s) are currently assigned to it on a particular day. (A Male only room one day could just as easily be a Female only room the next).              Capacity will auto-create the selected number of beds after creating the room. Editing the bed names can be done afterwards.              The list of defined resources will be listed as a table in a familiar tree format. Once a resource is created, the name can be changed by clicking on the "Edit" icon under "Actions". Click "Save" to apply the changes immediately.              Clicking "Delete" will delete the selected group/room/bed and all elements underneath. Note that you will not be able to delete any resource that has an allocation (future or past) assigned to it.              At the moment, you are not able to moved a group/room to another group once it has been created. (This can be done directly on the db for now).             <h3>Resource Properties</h3>             You are also able to define properties for a "shared room". Properties are another way to group rooms into specific categories to be used when allocating guests. Click on the notepad icon <img src="http://hostel-reservations.googlecode.com/svn/trunk/wordpress/wp-content/plugins/booking/img/notes_rd.png" alt="" /> to view the Edit Properties screen.              <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/resource_properties_sample.png" alt="" />              For example, a room can be set to have a property called "ocean view". During allocation, you can select this as a required property when allocating the guests so only beds in these rooms will allocated if availability exists.              The different property values can be defined under the Settings admin menu.
        </xsl:when>

        <xsl:when test="name = 'housekeeping'">
            <h1>Introduction</h1>             Report used by cleaners showing which beds require linen changing.             <h1>Details</h1>             <img src="http://hostel-reservations.googlecode.com/svn/wiki/images/housekeeping_sample.png" alt="" />              Groups/rooms are shown in the same order as in the Resources page. Empty beds are marked as E (should already have clean linen). / marks beds which have been slept in but don't require a change because the guest hasn't checked out yet. C indicates the guest should have checked out that day and require a new set of linen.              A rule may be updated in the Settings tab which indicate the maximum number of days that a bed can remain as / (unchanged). (e.g. force a change of sheets even if the same guest is in the bed every X number of days)              No changes can be made on this screen.              <em>This page has not yet been implemented.</em>
        </xsl:when>

        <xsl:when test="name = 'faq'">
            <ul>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-add-a-new-booking</xsl:attribute>How do I add a new booking?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-add-additional-nights-to-an-existing-booking</xsl:attribute>How do I add additional nights to an existing booking?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-cancel-nights-from-an-existing-booking</xsl:attribute>How do I cancel nights from an existing booking?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-change-the-room-allocation-for-a-booking</xsl:attribute>How do I change the room allocation for a booking?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-check-in-a-guest</xsl:attribute>How do I check in a guest?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-checkout-a-single-guest</xsl:attribute>How do I checkout a single guest?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-checkout-all-guests-for-a-booking</xsl:attribute>How do I checkout all guests for a booking?</a></li>                <li><a><xsl:attribute name="href"><xsl:value-of select="homeurl"/>/help/faq/how-do-i-deactivate-a-room-for-a-particular-set-of-dates</xsl:attribute>How do I deactivate a room for a particular set of dates?</a></li>            </ul>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-add-a-new-booking'">
            <h2>Summary</h2>             A new booking is received (e.g. by telephone, walk-in) for a future date.             <h2>Process</h2>             <ol> 	            <li>Click on "New Booking"</li> 	            <li>Enter booking name, referrer, (deposit, balance to pay on arrival).</li> 	            <li>Select the dates for the booking.</li> 	            <li>Enter the number of guests, gender (if available) and the room (or type of room). Select the room properties applicable for this allocation. Click Add. A table of allocations will show the selected dates highlighted as reserved. Repeat this for any additional guests.</li> 	            <li>Click Save when done.</li>             </ol>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-check-in-a-guest'">
            <h2>Summary</h2>            Guest arrives with a previous booking.            <h2>Process</h2>            <ol> 	            <li>Click on the "Bookings" page from the Admin menu.</li> 	            <li>Enter name/reservation number, under "Match Dates By" select "Check-In Date" and set date to today. Click Search.</li> 	            <li>Find reservation. Click on edit icon.</li> 	            <li>Take remainder of guest(s) names. Click edit on each of the allocation fields and OK after entering the name of each guest.</li> 	            <li>Balance to pay on arrival displayed. (Take payment from guest(s) and write up access cards).</li> 	            <li>Toggle status on the reservation by clicking on the dates of each allocation from (R)eserved to (P)aid.</li> 	            <li>Click Save.</li>            </ol>        </xsl:when>

        <xsl:when test="name = 'how-do-i-checkout-a-single-guest'">
            <h2>Process</h2>            <ol> 	            <li>Click "Bookings" from the Admin menu.</li> 	            <li>For Date (from) and Date (to) select today's date.</li> 	            <li>Under "Match Dates By", select Check-Out Date.</li> 	            <li>Keep name blank (for all) or enter the name of the person checking out.</li> 	            <li>Click Search.</li> 	            <li>Click on the "Edit" icon of the matching booking to checkout. If there is only one guest for a booking, click on the "Checkout" icon for the matching booking.</li> 	            <li>If editing a booking, under the correct <em>allocation</em> click the "Checkout" icon next to today's date.</li> 	            <li>Click Save.</li>            </ol>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-checkout-all-guests-for-a-booking'">
            <h2>Process</h2>            <ol> 	            <li>Click "Bookings" from the Admin menu.</li> 	            <li>For Date (from) and Date (to) select today's date.</li> 	            <li>Under "Match Dates By", select Check-Out Date.</li> 	            <li>Keep name blank (for all) or enter the name of the person checking out.</li> 	            <li>Click Search.</li> 	            <li>Click on the "Checkout" icon of the matching booking to checkout.</li> 	            <li>Click OK on the confirmation dialog.</li>            </ol>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-add-additional-nights-to-an-existing-booking'">
            <h2>Process</h2>            <ol> 	            <li>Click "Bookings" under the Admin menu.</li> 	            <li>Enter name/reservation number, under "Match Dates By" select "Check-In Date" and set date to date when booking starts. Click Search.</li> 	            <li>Click "Edit" on the booking to be changed.</li> 	            <li>For each of the guests in allocations table, toggle the state of the additional nights to (P)aid (if they have paid), (H)ours if they paid using hours or (R)eserved if they have not checked in yet (adjust payment due as required).</li> 	            <li>If paid using someone else's hours, click Edit on the allocation. Enter the initials of the person the hours are coming from on each date and click ok.</li> 	            <li>Click Save.</li>            </ol>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-cancel-nights-from-an-existing-booking'">
            <h2>Summary</h2>            Guest requests booked nights be cancelled. This could be a from a guest who has already checked in (and already paid for the nights) or from a future booking (hasn't arrived yet).            <h2>Process</h2>            <ol> 	            <li>Click "Bookings" from the Admin menu.</li> 	            <li>Enter name/reservation number and set date to start date of booking. Click Search.</li> 	            <li>Find reservation. Click Edit.</li> 	            <li>For each of the guests under Allocations, toggle the state of the nights to cancel to Available (not coloured). Adjust payment due if a refund was given.</li> 	            <li>Click Save.</li>            </ol>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-change-the-room-allocation-for-a-booking'">
            <h2>Process</h2>            <ol> 	            <li>Click "Bookings" under the Admin menu.</li> 	            <li>Enter name/reservation number and set date to start date of booking. Click Search.</li> 	            <li>Find reservation. Click Edit.</li> 	            <li>For the allocation to move, click Edit.</li> 	            <li>Change the room assigned to either a specific room number or a particular group. Click ok. (If a group was assigned, a new bed will be assigned within the group or message will be displayed if no availability)</li> 	            <li>Click Save (error message will be displayed if no availability for the given rooms/dates).</li>            </ol>
        </xsl:when>

        <xsl:when test="name = 'how-do-i-deactivate-a-room-for-a-particular-set-of-dates'">
            <h2>Summary</h2>            We want to temporarily remove a room so it can no longer be allocated to guests for a particular set of dates.            <h2>Process</h2>            Effectively, we add a booking with 0 payment amount to the dates to deactivate covering all the beds in the room.            <ol> 	            <li>Click Add Booking.</li> 	            <li>Set name to "Inactive".</li> 	            <li>Select the dates that the room should be inactive for. (Obviously, there can't be any bookings for the dates selected).</li> 	            <li>For number of guests, enter the total number of beds in the room.</li> 	            <li>Click Add.</li> 	            <li>Click Save.</li>            </ol>
        </xsl:when>

        <xsl:otherwise>
            Help page slug '<xsl:value-of select="name"/>' not recognised.
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

</xsl:stylesheet>